package com.ms.service.module.fish.message.server;

import java.nio.ByteBuffer;

import com.ms.service.module.fish.bin.ConfScript;
import com.ms.service.module.fish.message.FishBaseMessage;

/**
 * 鱼类进入
 * @author cuiwm
 */
public class FishMessage extends FishBaseMessage {
	
    private ConfScript script;
    
    public FishMessage(ConfScript script) {
    	this.setScript(script);
	}

	public ConfScript getScript() {
		return script;
	}

	public void setScript(ConfScript script) {
		this.script = script;
	}

	@Override
	public void writeBody(ByteBuffer buf) {
		buf.putInt(script.getScriptId());
		buf.putInt(script.duration());
	}


}